﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#if DOT_NET
using Microsoft.VisualStudio.TestTools.UnitTesting;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
#endif
using StyleMVVM.DependencyInjection;
using StyleMVVM.UnitTests.TestClasses.SimpleObjects;

namespace StyleMVVM.UnitTests.TestClasses.SimpleObjects
{
	[Export]
	public class ImportMethodClass
	{
		private ITestInterface testInterface;
		private IExportByInterfaceClass exportClass;

		[ImportMethod]
		public void ImportMethod(ITestInterface testInterface,
		                         IExportByInterfaceClass exportClass,
		                         [Import(Required = false)] IDummyInterface dummy)
		{
			this.testInterface = testInterface;
			this.exportClass = exportClass;

			Assert.IsNull(dummy);
		}

		public ITestInterface TestInterface
		{
			get { return testInterface; }
		}

		public IExportByInterfaceClass ExportClass
		{
			get { return exportClass; }
		}
	}
}